import com.lbi.core.events.Event;
import com.lbi.core.helper.Attach;
import com.lbi.framework.mvc.view.ViewBase;

import example.app.models.App;
import example.app.models.Person;
import example.app.views.people.PersonThumbnailView;
import example.app.views.people.PeopleMenuView;
/**
 * @author michaelforrest
 */
class example.app.views.AppView extends ViewBase{
	// variable naming is domain-based, although sometimes it may be better to use something more generic like 'model'
	private var app : App;
	
	public static function create ( $parent : MovieClip, $depth : Number ) : AppView
	{
		return Attach.MovieClipClass($parent,AppView, $depth);     
	}
	public function AppView() {
		app = App.getInstance();
		app.registerEvents(this,[Event.READY],"AppView");
	}
	private function respondToReady() : Void{
		PeopleMenuView.create(this,getNextHighestDepth());
		Person.people.select(Person(Person.people.first()));
	}
}